﻿<%@page import="java.util.Date"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page contentType="text/html;charset=utf-8" language="java"%>

<%
	String baseP = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ "/";
%>
<!doctype html>
<html>
<head>
<title>信息资讯</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="cleartype" content="on" />
<link rel="shortcut icon" href="/nocontent" />

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-touch-fullscreen" content="yes">
<meta name="viewport" content="width=device-width,user-scalable=no" />
<meta name="viewport" id="viewport" />
<link type="text/css" rel="stylesheet" href="<c:url value='/static/theme/3/main.css'/>">
<script type="text/javascript" src="<c:url value='/static/common/js/jquery-1.11.0.min.js'/>"></script>
<style type="text/css">
.home_li .img_slider{ 
	width:96%; 
	float:left; 
	margin:10px 2%; 
}
</style>
<script type="text/javascript">
	$(function(){
		$(".position_r .img_slider").each(function(){
			var img = $(this).attr("data");
			$(this).css("background","url("+img+")");
			$(this).css("background-repeat","no-repeat");
			$(this).css("background-position","center");
		});
		
//		var mobileHeight = $(document).height();
		var mobileHeight = $(window).height();
		_height = mobileHeight*0.4;
		//alert(_height);
		$(".home_li .img_header").css("height",_height);
	});
</script>
<script>
	function dourl(url) {
		location.href = url;
	}
	function returnIndex() {
		location.href = "<c:url value='/index/${mer_id}'/>?version=${version}";
	}
</script>
</head>

<body class="body_bg">
	<!--主体结构开始-->
	<div class="home_main">
	  <!--logo开始-->
	  <div class="home_logo"> <img src="<c:url value='/static/theme/3/images/logo.png'/>"/> </div>
	  <!--信息资讯开始-->
	  <c:forEach var="groups" items="${grouplist}" varStatus="vs">
		  <div class="home_slider mart15">
		    <ul>
		    	<c:forEach var="news" items="${groups}" begin="0" end="0">
			      <li onclick="location.href='<c:url value='/index/detail/police/${themeId}/${news.sid}'/>';" class="xxzx_time">
			      	<fmt:formatDate value="${news.showdateTime}" type="date" dateStyle="full"/>
			      </li>
			      <li onclick="location.href='<c:url value='/index/detail/police/${themeId}/${news.sid}'/>';" class="home_li position_r">
						<c:choose>
						   <c:when test="${fn:startsWith(news.picCover,'http')}">
								<div id="img_slider" class="img_slider img_header" data="${news.picCover}"></div>
						   </c:when>
						   <c:otherwise>
						   		<div id="img_slider" class="img_slider img_header" data="<%=baseP%>szgawx/static/biz/${news.mer_id}/${news.picCover}"></div>
						   </c:otherwise>
						</c:choose>
			        <p class="p_text"><span>${news.title}</span></p>
			      </li>
				</c:forEach>
		      <c:forEach var="news" items="${groups}" begin="1" end="3" varStatus="vs">
			      <li class="home_li" onclick="location.href='<c:url value='/index/detail/police/${themeId}/${news.sid}'/>';">
			        <div class="text_main">
			          <div class="lf_text">${news.title} </div>
			          <div class="rt_text"> 
						<c:choose>
						   <c:when test="${fn:startsWith(news.picCover,'http')}">
								<img src="${news.picCover}" style="margin: 0px 2%;" class="img_slider" />
						   </c:when>
						   <c:otherwise>
						   		<img src="<%=baseP%>szgawx/static/biz/${news.mer_id}/${news.picCover}" style="margin: 2px 2%;" class="img_slider" />
						   </c:otherwise>
						</c:choose>
			          </div>
			        </div>
			      </li>
		      </c:forEach>
		    </ul>
		  </div>
	  </c:forEach>
	</div>
</body>
</html>
